#include <stdio.h>

void avg_sum(double a[], int n, double *avg, double *sum);

int main(void)
{
    int n = 5;
    double a[n], j, k;

    printf("Please input %d numbers\n", n);

    for (int i = 0; i < n; i++)
        scanf(" %lf", &a[i]);

    avg_sum(a, n, &j, &k);

    printf("%.2lf\n", j);
    printf("%.2lf", k);

    return 0;
}

void avg_sum(double a[], int n, double *avg, double *sum)
{
    *sum = 0.0;

    for (int i = 0; i < n; i++)
        *sum += a[i];
    *avg = *sum / n;
}